using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._AreaandVolume
{
    /// <summary>
    /// <para>Surface Volume</para>
    /// <para>Calculates the area and volume of the region between a surface and a reference plane.</para>
    /// <para>计算曲面和参照平面之间的区域的面积和体积。</para>
    /// </summary>    
    [DisplayName("Surface Volume")]
    public class SurfaceVolume : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SurfaceVolume()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The raster, TIN, or terrain surface to process.</para>
        /// <para>要处理的栅格、TIN 或 terrain 表面。</para>
        /// </param>
        public SurfaceVolume(object _in_surface)
        {
            this._in_surface = _in_surface;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Surface Volume";

        public override string CallName => "3d.SurfaceVolume";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_surface, _out_text_file, _reference_plane.GetGPValue(), _base_z, _z_factor, _pyramid_level_resolution];

        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The raster, TIN, or terrain surface to process.</para>
        /// <para>要处理的栅格、TIN 或 terrain 表面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Output Text File</para>
        /// <para>A comma-delimited ASCII text file containing the area and volume calculations. If the file already exists, the new results will be appended to the file.</para>
        /// <para>以逗号分隔的 ASCII 文本文件，包含面积和体积计算。如果文件已存在，则新结果将追加到该文件中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Text File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_text_file { get; set; } = null;


        /// <summary>
        /// <para>Reference Plane</para>
        /// <para><xdoc>
        ///   <para>The direction from the reference plane for which to calculate the results.</para>
        ///   <bulletList>
        ///     <bullet_item>Above the Plane—Volume and area calculations will represent the region of space between the specified plane height and the portions of the surface that are above the plane. This is the default.</bullet_item><para/>
        ///     <bullet_item>Below the Plane—Volume and area calculations will represent the region of space between the specified plane height and portions of the surface that are below the plane.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>从参考平面计算结果的方向。</para>
        ///   <bulletList>
        ///     <bullet_item>平面上方 - 体积和面积计算将表示指定平面高度与平面上方曲面部分之间的空间区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>平面下方 - 体积和面积计算将表示指定平面高度与平面下方曲面部分之间的空间区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Plane")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reference_plane_value _reference_plane { get; set; } = _reference_plane_value._ABOVE;

        public enum _reference_plane_value
        {
            /// <summary>
            /// <para>Above the Plane</para>
            /// <para>Above the Plane—Volume and area calculations will represent the region of space between the specified plane height and the portions of the surface that are above the plane. This is the default.</para>
            /// <para>平面上方 - 体积和面积计算将表示指定平面高度与平面上方曲面部分之间的空间区域。这是默认设置。</para>
            /// </summary>
            [Description("Above the Plane")]
            [GPEnumValue("ABOVE")]
            _ABOVE,

            /// <summary>
            /// <para>Below the Plane</para>
            /// <para>Below the Plane—Volume and area calculations will represent the region of space between the specified plane height and portions of the surface that are below the plane.</para>
            /// <para>平面下方 - 体积和面积计算将表示指定平面高度与平面下方曲面部分之间的空间区域。</para>
            /// </summary>
            [Description("Below the Plane")]
            [GPEnumValue("BELOW")]
            _BELOW,

        }

        /// <summary>
        /// <para>Plane Height</para>
        /// <para>The Z value of the plane that will be used to calculate area and volume.</para>
        /// <para>将用于计算面积和体积的平面的 Z 值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Plane Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _base_z { get; set; } = null;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor by which z-values will be multiplied. This is typically used to convert z linear units to match x,y linear units. The default is 1, which leaves elevation values unchanged. This parameter is not available if the spatial reference of the input surface has a z datum with a specified linear unit.</para>
        /// <para>z 值将乘以的因子。这通常用于转换 z 线性单位以匹配 x，y 线性单位。默认值为 1，使高程值保持不变。如果输入曲面的空间参考具有具有指定线性单位的 z 基准面，则此参数不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        public SurfaceVolume SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}